/*
 * @Author: xxx
 * @Description:
 */
import { createApp,defineComponent  } from "vue";
import "@/libs/cssConfig";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import "element-plus/dist/index.css";
import "@/assets/css/Element.scss";
import "@/assets/css/variable.less";
import globalDirective from "@/plugins/globalDirective";
import globalComponent from '@/libs/globalComponent'
import globalMethod from "@/libs/globalMethod";
import '@/assets/font/iconfont.css'
import JsonExcel from 'vue-json-excel3'

// import component from "@/mixins/component.js";
// import mixin from "@/mixins/page.js";
import $ from "jquery";
import store from "@/store";
// 引入外部JS文件
const app = createApp(App);
app.config.globalProperties.$ = app.config.globalProperties.jQuery = $;
const loadExternalScript = () => {
  const script = document.createElement('script')
  script.src = './src/plugins/jquery_expand.js'
  script.type = 'text/javascript'
  document.body.appendChild(script)
}
app.component("downloadExcel", JsonExcel)
app.config.globalProperties.$loadExternalScript = loadExternalScript
// app.mixin(component,mixin)

//app.component('downloadExcel', JsonExcel)
app.use(router);
app.use(store);
app.use(globalDirective);
app.use(globalComponent);
app.use(globalMethod);
app.use(loadExternalScript);
app.use(ElementPlus, {
  locale: zhCn,
});
app.mount("#app");
